package com.zj.study.utils.execption;

import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
public class MessageException extends BasicException {

  private final String fireMessage;

  public MessageException(String message) {
    super(message);
    this.fireMessage = message;
  }

  public MessageException(String message, String fireMessage) {
    super(message);
    this.fireMessage = fireMessage;
  }

  public MessageException(Throwable throwable) {
    super(throwable.getMessage());
    this.fireMessage = throwable.getMessage();
  }

  public MessageException(String message, Throwable cause, String fireMessage) {
    super(message, cause);
    this.fireMessage = fireMessage;
  }

  public MessageException(Throwable cause, String fireMessage) {
    super(cause);
    this.fireMessage = fireMessage;
  }
}